import http from '../http'

// 分页查询采购退货列表
export function getPurchaseReturnPage(data) {
  return http({
    url: '/api/procurement/purchase/return/page',
    baseURL: '',
    method: 'post',
    data
  })
}

// 新增采购退货
export function addPurchaseReturn(data) {
  return http({
    url: '/api/procurement/purchase/return/add',
    baseURL: '',
    method: 'post',
    data
  })
}

// 查询采购退货详情
export function getPurchaseReturnDetail(id) {
  return http({
    url: `/api/procurement/purchase/return/detail/${id}`,
    baseURL: '',
    method: 'get'
  })
}

// 更新采购退货
export function updatePurchaseReturn(data) {
  return http({
    url: '/procurement/purchase/return/update',
    baseURL: '',
    method: 'put',
    data
  })
}

// 删除采购退货
export function deletePurchaseReturn(id) {
  return http({
    url: `/procurement/purchase/return/delete/${id}`,
    baseURL: '',
    method: 'delete'
  })
}

// 导出采购退货数据
export function exportPurchaseReturn(data) {
  return http({
    url: '/api/procurement/purchase/return/export',
    baseURL: '',
    method: 'post',
    data
  })
}
